home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9342 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: rs6000.cmp.ilstu.edu!not-for-mail
  2. From: edstanf@rs6000.cmp.ilstu.edu (Eric D. Stanfield)
  3. Newsgroups: comp.lang.c++
  4. Subject: Could use some help...
  5. Date: 1 Mar 1996 05:48:10 GMT
  6. Organization: Illinois State University
  7. Message-ID: <4h632q$eij@thor.cmp.ilstu.edu>
  8. NNTP-Posting-Host: rs6000.cmp.ilstu.edu
  9. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  10.  
  11. Here's my prob:
  12.  
  13.   void check_board(int [], int [5][5], int [5][5]); // prototype
  14.  
  15.   // Heres the function:
  16.  
  17. void check_board(int bingo_numbers[], int start_numbers[5][5], int
  18. new_board[5][5]) {
  19.   int i, j, x, y, z;
  20.  
  21.   for(y = 0; y < 5; y++)
  22.     for(z = 0; z < 5; z++)
  23.       new_board[y][z] = 0;
  24.  
  25.   for(i = 0; i < 10; i++)
  26.     for(j = 0; j < 5; j++)
  27.       for(x = 0; x < 5; x++)
  28.         if(bingo_numbers[i] = start_numbers[j][k]) //THIS IS THE PROB
  29.           new_board[j][k] = -1;
  30.         else
  31.           new_board[j][k] = start_numbers[j][k];
  32. }
  33.  
  34.   The problem is that start_numbers[j][k] does not get copied
  35. into new_board[j][k].  There are no errors or warnings when I
  36. compile it and I've traced both arrays and cant find the reason
  37. this is happening.  Please post if you can help, I'm under the gun
  38. for time.  Thanks.
  39.